package com.smartwebx.ha.web.admin.module.screen.role;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.smartwebx.ha.biz.assign.HaRoleManager;

public class AjaxTableRole {
	@Autowired
	private HttpServletResponse response;
	@Autowired
	private HaRoleManager haRoleManager;
	
	public void execute()throws IOException{
		response.setContentType("application/json");
		PrintWriter out=response.getWriter();
		ObjectMapper mapper=new ObjectMapper();
		mapper.writeValue(out, haRoleManager.findAll());
	}
	

}
